/*
 * timemanage.h
 *
 *  Created on: 2025.5.15
 *      Author: TracyHenry
 */

#ifndef TIMEMANAGE_H_
#define TIMEMANAGE_H_
#include "FreeRTOS.h"
#include "task.h"
#include "stm32f1xx_hal.h"
#include "cmsis_os.h"
#include "i2c.h"

typedef  struct
{
	uint8_t year;
	uint8_t month;
	uint8_t date;
	uint8_t day;
	uint8_t hour;
	uint8_t minute;
	uint8_t second;
}TimeInfo;

extern TimeInfo now_time;

void taskTimeManageInit(void);
void DS1307_SetTime(uint8_t seconds, uint8_t minutes, uint8_t hours, uint8_t date, uint8_t month, uint8_t year, uint8_t day);
void DS1307_GetTime(uint8_t *seconds, uint8_t *minutes, uint8_t *hours, uint8_t *date, uint8_t *month, uint8_t *year, uint8_t *day);
void timeManageTask(void const * argument);

#endif /* TIMEMANAGE_H_ */
